/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tvunetworks.service.impl;

import com.tvunetworks.dao.AccountDao;
import com.tvunetworks.model.Account;
import com.tvunetworks.service.AccountManager;
import org.springframework.beans.factory.annotation.Required;

/**
 *
 * @author michael
 */
public class AccountManagerImpl extends GenericManagerImpl<Account, String> implements AccountManager {

    private AccountDao accountDao;

    public AccountDao getAccountDao() {
        return accountDao;
    }

    @Required
    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    public Account getAccount(String username) {
        return accountDao.getAccount(username);
    }

    public Account getAccount(String username, String password) {
        return accountDao.getAccount(username, password);
    }

    public void insertAccount(Account account) {
        accountDao.insertAccount(account);
    }

    public void updateAccount(Account account) {
        accountDao.updateAccount(account);
    }
}
